/**
 *
 *
 * +----------------------------------------------------------------------------------------------+
 * |Date               |  Version  |Author             |Description                              |
 * |==========+=======+==============+===================|
 * |2019年10月17日     |  1.0.0       | Administrator                 |Initial                                       |
 * +----------------------------------------------------------------------------------------------+
 */
package com.wanma.redis;

import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

/**
 * 
 * @ClassName PubSubDemo
 * @Description  
 * 
 */
public class PubSubDemo {
	 public static void main( String[] args )
	    {
	        // 连接redis服务端
	        JedisPool jedisPool = new JedisPool("49.235.149.81");
	        
	        System.out.println(String.format("redis pool is starting, redis ip %s, redis port %d", "49.235.149.81", 6379));

	        SubThread subThread = new SubThread(jedisPool);  //订阅者
	        subThread.start();

	        Publisher publisher = new Publisher(jedisPool);    //发布者
	        publisher.start();
	    }
}
